import { animationPool } from "@/animationPool";
import { MyThings } from "@/interfaces/myThings.interface";

export function addToAnimationPool() {
  return function (target: Function, ctx: ClassMethodDecoratorContext) {
    return async function (this: MyThings) {
      await target.bind(this)();
      animationPool.set(this.mesh.name, () => this.update());
    };
  };
}
